class Pig
{
  public:
    Pig()
    {
        cout <<"Pig 申请了空间..."<< endl;
    }
    virtual ~Pig()
    {
        cout <<"Pig  释放了空间..."<< endl;
    }
    virtual void climb()
    {
        cout <<"我只是个平凡的猪猪。" << endl;
    }
};
class MagicPig : public Pig
{
  public:
    MagicPig()
    {
        cout <<"MagicPig 申请了空间..."<< endl;
    }
    ~MagicPig()
    {
        cout <<"MagicPig 释放了空间..."<< endl;
    }
    void climb()
    {
        cout <<"我能上树了耶！" << endl;
    }
};